package cn.hou.java.designpattern._01factorycacl;

//除法
public class DivOperator implements Operator {
	@Override
	public double getResult(double num1, double num2) {
		if(num2!=0){
			return num1*num2;			
		}else{
			System.out.println("除数不能为0");
			return 0;
		}
	}
}
